#include <stdio.h>

int main() {
    int cock, hen, chick;
    // 公鸡5文钱1只，母鸡3文钱1只，小鸡1文钱3只
    // 问题：100文钱，买100只鸡，求各种鸡的数量
    for (cock = 0; cock <= 20; cock++) {
        for (hen = 0; hen <= 33; hen++) {
            chick = 100 - cock - hen;
            if (5*cock + 3*hen + chick/3 == 100 && chick % 3 == 0) {
                printf("cock = %d, hen = %d, chick = %d\n", cock, hen, chick);
            }
        }
    }
    return 0;
}